<template>
  <div>
      <el-form :model="form" label-width="80px">
        <el-form-item label="分类名称">
          <el-input style="width: 200px;" v-model="form.cname"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button @click="submit">提交</el-button>
        </el-form-item>
      </el-form>
  </div>
</template>

<script>
export default {
  data(){
    return {
      form: {
        cid:0,
        cname: ''
      }
    }
  },
  methods: {
    submit(){
      this.$http({
        path: this.$api.Classify.add,
        method: 'post',
        params: this.form
      }).then(res=>{
        console.log(res);
      })
    }
  }
}
</script>

<style>

</style>